package com.handinglian.ai.callin.enums;

public enum IsServiceEnum {
    SERVICE(1,"客服内容"),
    MASS(2,"群众内容");

    public static IsServiceEnum valueOfOrdinal(Integer ordinal) {
        return ordinal == null || ordinal >= values().length ? null : values()[ordinal];
    }
    public static IsServiceEnum valueOfDesc(String desc) {
        for(IsServiceEnum recordStateEnum : IsServiceEnum.values()){
            if(desc.equals(recordStateEnum.getDescription())){
                return recordStateEnum;
            }
        }
        return null;
    }
    public static IsServiceEnum valueOfKey(Integer key){
        for(IsServiceEnum recordStateEnum : IsServiceEnum.values()){
            if(recordStateEnum.getKey()==key){
                return recordStateEnum;
            }
        }
        return null;
    }
    private final Integer key;
    private final String description;

    IsServiceEnum(Integer key, String description) {
        this.key = key;
        this.description = description;
    }

    public Integer getKey() {
        return key;
    }
    public String getDescription() {
        return this.description;
    }
}
